package de.koller.million.card.frame.enc;

import de.koller.million.card.CNode;
import de.koller.million.card.commands.RemoveCNode;
import de.koller.million.card.engine.enc.Encounter;

public class EncounterFrame extends CNode {

	private final Encounter encounter;
	public final EncounterFrameComp comp = new EncounterFrameComp( this );

	public EncounterFrame( Encounter encounter ) {
		this.encounter = encounter;
	}

	@Override
	protected void init() {
		super.init();
		
		comp.setVisible( true );
	}

	@Override
	protected void release() {
		super.release();
		
		comp.dispose();
		encounter.view = null;
	}
	
	void closeThis() {
		croot.call( new RemoveCNode( this ) );
	}
	
}
